﻿using System;
using System.Runtime.InteropServices;
using DataService.Enums;

namespace DataService.Structs;

[StructLayout(LayoutKind.Sequential)]
public struct Scaling : IComparable<Scaling>
{
    public short ID;

    public ScaleType ScaleType;

    public float EUHi;

    public float EULo;

    public float RawHi;

    public float RawLo;

    public Scaling(short id, ScaleType type, float euHi, float euLo, float rawHi, float rawLo)
    {
        ID = id;
        ScaleType = type;
        EUHi = euHi;
        EULo = euLo;
        RawHi = rawHi;
        RawLo = rawLo;
    }

    public int CompareTo(Scaling other)
    {
        return ID.CompareTo(other.ID);
    }

    public static readonly Scaling Empty = new Scaling { ScaleType = ScaleType.None };
}
